<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
    layout:decorator="blog/layout" th:with="title='Archives |',active='archives'">
<header th:replace="blog/layout::headerFragment(${title},${active})"></header>

<body>
    <div layout:fragment="content">
        <div class="content-wrap">
            <div id="content" class="content page-archive">
                <section id="posts" class="posts-collapse ">
                    <span class="archive-move-on"></span>
                    <span class="archive-page-counter">Good! Now <th:block th:text="${session.articleCount}"></th:block>
                        Blogs in Total!</span>

                    <div class="collection-title">
                        <h2 class="archive-year motion-element">2021</h2>
                    </div>

                    <th:block th:if="${articles.list}">
                        <article th:each="article : ${articles.list}" class="post post-type-normal">
                            <header class="post-header">
                                <h1 class="post-title">
                                    <a class="post-title-link" th:href="@{'/detail/' + ${article.cid}}">
                                        <span th:text="${article.title}"></span>
                                    </a>
                                </h1>
                                <div class="post-meta">
                                    <time class="post-time"
                                        th:text="${commons.fmtdate(article.created, 'MM-dd')}"></time>
                                </div>
                            </header>
                        </article>
                    </th:block>
                </section>
                <!--分页-->
                <div th:replace="comm/pagination::pageNav(${articles})"></div>
            </div>
        </div>
    </div>
</body>

</html>